import request from "@/utils/request";
import { AxiosPromise } from "axios";
import { MenuQuery, MenuVO, MenuForm } from "./types";

/**
 * 获取设备详情信息
 */
export function deviceDetail(data) {
  return request({
    url: "/openapi/device/detail",
    method: "post",
    data,
  });
}
/**
 * 病虫 弹窗-杀虫统计
 */
export function getPestsNums(data) {
  return request({
    url: "/openapi/property/getPestsNums",
    method: "post",
    data,
  });
}
/**
 * 病虫 弹窗-杀虫上报数据列表
 */
export function getPestsList(data) {
  return request({
    url: "/openapi/property/getPestsList",
    method: "post",
    data,
  });
}
/**
 * 水肥一体机 弹窗-肥流量、电量统计
 */
export function getWaterNums(data) {
  return request({
    url: "/openapi/property/getWaterNums",
    method: "post",
    data,
  });
}

/**
 * 土壤 弹窗-温度、湿度、酸碱值
 */
export function getSoilStatistics(data) {
  return request({
    url: "/openapi/property/getSoilStatistics",
    method: "post",
    data,
  });
}
/**
 * 土壤检测同比数值
 */
export function getSoilBasis(data) {
  return request({
    url: "/openapi/property/getSoilBasis",
    method: "post",
    data,
  });
}
/**
 * 弹窗-风速、温度、湿度、日降水量
 */
export function getWeatherStatistics(data) {
  return request({
    url: "/openapi/property/getWeatherStatistics",
    method: "post",
    data,
  });
}

/**
 * 弹窗-获取风速风向
 */
export function getWeatherDirectionAndSpeed(data) {
  return request({
    url: "/openapi/property/getWeatherDirectionAndSpeed",
    method: "post",
    data,
  });
}

/**
 * 弹窗-苗情饼状图
 */
export function getSeedlingInfo(data) {
  return request({
    url: "/openapi/property/getSeedlingInfo",
    method: "post",
    data,
  });
}
/**
 * 弹窗-苗情柱形图
 */
export function getSeedlingYears(data) {
  return request({
    url: "/openapi/property/getSeedlingYears",
    method: "post",
    data,
  });
}
